﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="Default.aspx.cs" Inherits="_Default" EnableEventValidation="true" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <p>
    </p>
    <asp:Panel ID="Panel4" Height="10" runat="server">
    </asp:Panel>
    <p>
    </p>
    <h2>
        Welcome to iBookShop.
    </h2>
    <p>
        
    </p>
    <p>
       Find your favourite books below.
    </p>
        <p>
    </p>
    <asp:Label ID="Panel5" Height="20" runat="server">
    </asp:Label>
    <p>
    </p>
     <asp:Label ID="Panel7" Width="20" runat="server">
    </asp:Label>
    <asp:Button ID="NewButton" Text="最新上架" runat="server" 
        onclick="NewButton_Click"/>
    <asp:Button ID="HotButton" Text="热销书籍" runat="server" 
        onclick="HotButton_Click" />
    <asp:Label ID="Panel8" Width="20" runat="server">
    </asp:Label>
    <asp:TextBox ID="SearchInput" runat="server" />
    <asp:Button ID="SearchButton" runat="server" Text="查询书籍" 
        onclick="SearchButton_Click"/>
    <p>
    </p>
    <asp:Panel Height="30" runat="server">
    </asp:Panel>
    <p>
    </p>
     <asp:DataList ID="BookList" runat="server" RepeatColumns="3" 
        RepeatLayout="Table" RepeatDirection="Horizontal"
            Height="720px" Width="900px" onitemcommand="BookList_ItemCommand">
            <SeparatorTemplate>
            </SeparatorTemplate>
            <ItemTemplate>
            <asp:Panel ID="Panel1" runat="server" Height="170" Width="310" HorizontalAlign="Center">           
               <asp:Panel ID="Panel2" runat="server" Height="150" Width="300" HorizontalAlign="Center" BorderStyle="Dashed" BorderWidth="1" BorderColor="Gray">
                  <asp:Panel ID="Panel3" runat="server" Height="25"></asp:Panel>
                  <table>
                    <tr>
                      <td rowspan="3"><asp:ImageButton runat="server" ID="BookPicture" CommandName="Select"
                      ImageUrl='<%# Eval("BookPicture") %>'
                      Width="100" Height="100" />
                      </td>
                      <td align="center">
                            <asp:Label Height="40" Width="180" runat="server" ID="BookName" Font-Bold="true" 
                             Font-Size="Small" Font-Names="微软雅黑" ForeColor="DarkBlue"
                            Text='<%# Eval("BookName") %>'> 
                            </asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td align="left">  
                            <asp:Label Height="30" Width="40" runat="server" ID="BookPriceLabel1" Font-Bold="true"
                            Font-Size="Small" Font-Names="微软雅黑" Text="价格 :" ForeColor="Gray" />
                            <asp:Label Height="30" Width="20" runat="server" ID="BookPriceLabel2" Font-Bold="true"
                            Font-Size="Small" Font-Names="微软雅黑" Text="￥" ForeColor="DarkRed" />         
                            <asp:Label Height="30" Width="50" runat="server" ID="BookPrice" Font-Bold="true" ForeColor="DarkRed"
                            Font-Size="Small" Font-Names="微软雅黑" Text='<%# Eval("BookPrice") %>' />                            
                            </td>                
                        </tr>
                        <tr>
                        <td align="left">  
                            <asp:Label Height="30" Width="40" runat="server" ID="BookSalesLabel1" Font-Bold="true"
                            Font-Size="Small" Font-Names="微软雅黑" Text="销量 :" ForeColor="Gray" />         
                            <asp:Label Height="30" Width="20" runat="server" ID="BookSales" Font-Bold="true" ForeColor="DarkRed"
                            Font-Size="Small" Font-Names="微软雅黑" Text='<%# Eval("BookSoldNum") %>' /> 
                            <asp:Label Height="30" Width="30" runat="server" ID="BookSalesLabel2" Font-Bold="true"
                            Font-Size="Small" Font-Names="微软雅黑" Text="件" ForeColor="Gray" />                                
                            </td>                
                        </tr>
                    </table>
                </asp:Panel>
                </asp:Panel>
            </ItemTemplate>
       </asp:DataList>
</asp:Content>
